unit uDialog;

interface

uses
  SysUtils, Classes, Windows, Forms, Dialogs;

procedure InfoDlg(const msg: string);
procedure ErrorDlg(const msg: string);
procedure WarnDialog(const msg: string);
function ConfirmDialog(const msg: string): Boolean;

implementation

procedure InfoDlg(const msg: string);
begin
  MessageDlg(msg, mtInformation, [mbOK], 0);
end;

procedure ErrorDlg(const msg: string);
begin
  MessageDlg(msg, mtError, [mbOK], 0);
end;

procedure WarnDialog(const msg: string);
begin
  MessageDlg(msg, mtWarning, [mbOK], 0);
end;

function ConfirmDialog(const msg: string): Boolean;
begin
  Result := MessageDlg(msg, mtConfirmation, [mbYes, mbNo], 0) = IDYES;
end;

end.
